<script setup>
import {useRouter} from "vue-router";
const router = useRouter();

const getImageUrl = (img) => {
  return new URL(`../assets/${img}.png`,import.meta.url).href;
}

const goHome = () => {
  router.go(-2)
}
</script>

<template>
<div class="exception">
  <img :src="getImageUrl(404)"/>
  <el-button class="btn-home" @click="goHome">回到上一个页面</el-button>
</div>
</template>

<style scoped lang="less">
.exception{
  position: relative;
  width: 100%;
}
</style>